package util.Graph;

import java.util.Set;

public class UndirectedGraph  {
    private DirectedGraph _digraph;
    
    
    public UndirectedGraph() {
        _digraph = new DirectedGraph();
    }
    
    
    public Set<Node> getNodes() {
        return _digraph.getNodes();
    }

    
    public Node addNode() {
        return _digraph.addNode();
    }
    
       
    public Set<Node> getNeighbors(Node node) {
        return _digraph.getPreds(node); // pred is the same as succ for undirected graphs
    }
    
        
    public void addEdge(Node node0, Node node1) {
        _digraph.addEdge(node0, node1);
        _digraph.addEdge(node1, node0);
    }
    
}